package com.ticket.sass.admin.mapper;

import com.ticket.sass.common.entity.tenant.BannerPositionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ywb
 * @since 2024-04-30
 */
public interface BannerPositionMapper extends BaseMapper<BannerPositionEntity> {
    @Select("""
    SELECT
        position
    FROM
        banner_positions
    WHERE
        banner_id = #{bannerId}
    AND
        deleted_at IS NULL
    """)
    List<Short> getPositionArrayByBannerId(@Param("bannerId") Long noticeId);
}
